package cate.game.role.res.goldmall.po;

import cate.common.table.res.goldmall.row.GoldMallBaseRow;
import cate.game.GameBody;
import com.fasterxml.jackson.annotation.JsonIgnore;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass(value = "宝箱")
public class GoldBox {
    @NoteField(value = "宝箱ID")
    public int id;

    @NoteField(value = "已购买次数")
    public int num;

    @JsonIgnore
    public GoldMallBaseRow getRow(GameBody game) {
        return game.table.goldMall.base.get(id);
    }

    public GoldBox(int id) {
        this.id = id;
    }

    public GoldBox() {}
}
